package cn.lili.modules.store.mapper;

import cn.lili.modules.store.entity.dos.StoreInfo;
import cn.lili.modules.store.entity.vos.StoreInfoVO;
import com.baomidou.mybatisplus.core.conditions.Wrapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.core.toolkit.Constants;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;

/**
 * 门店数据处理层
 *
 * @author pikachu
 * @since2020-03-07 09:18:56
 */
public interface StoreInfoMapper extends BaseMapper<StoreInfo> {
    /**
     * 获取店铺分页列表
     *
     * @param page         分页
     * @param queryWrapper 查询条件
     * @return 店铺VO分页列表
     */
    @Select("select l.nick_name as nickName,l.mobile as mobile , e.* from e_store as e inner join li_member l on e.shopowner = l.id ${ew.customSqlSegment}")
    IPage<StoreInfoVO> getStoreInfoList(IPage <StoreInfo> page, @Param(Constants.WRAPPER) Wrapper <StoreInfo> queryWrapper);


}